package com.tueye.framework.core.template.support;

import java.io.IOException;
import java.io.StringWriter;

import freemarker.template.Template;
import freemarker.template.TemplateException;

/**
 * 类说明：模板辅助类
 * @author hanxiaowei
 *
 */
public abstract class FreeMarkerTemplateUtils {

	public static String processTemplateIntoString(Template template, Object model)throws IOException, TemplateException {
		
		StringWriter result = new StringWriter();
		template.process(model, result);
		return result.toString();
	}
}
